/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csse3004.GD.PAdmin;

import java.util.ArrayList;

/**
 *
 * @author Tom McNair - S41758984
 */
public interface PollAdminService {

    /**
     * Function to retrieve all the information needed for the Poll Administrator Home Page
     * 
     * @param userID ID of the Poll Master
     * @return 
     */
    public ArrayList<HomeData> getHomeData(int userID);
    
    /**
     * Function that returns the next id in a specified table
     * 
     * @param Table The name of the Table
     * @return The next available ID of the specified table
     */
    public int getNextID(String Table);

    /**
     * Function to define a new Poll
     * 
     * @param pollName Name of the Poll
     * @param adminID ID of the Poll Administrator
     * @return True if creation was successful
     */
    public boolean createPoll(String pollName, int adminID);

    /**
     * Function to assign a poll creator to a poll
     * 
     * @param pollID ID of the Poll
     * @param creatorID ID of the Poll Creator
     * @return True if assignment was successful
     */
    public boolean assignToPollCreator(int pollID, int creatorID);

    /**
     * Function to remove a poll creator from a poll
     * 
     * @param pollID ID of the Poll
     * @param creatorID ID of the Poll Creator
     * @return True if removal was successful
     */
    public boolean removePollCreator(int pollID, int creatorID);
    
    /**
     * Function to get the list of Poll Creators that haven't been assigned to a poll
     * 
     * @return Returns an ArrayList<int> of Poll Creator ID's
     */
    public ArrayList<AssignPollCreatorData> getUnassignedCreators(int pollID);
    
    /**
     * Sets the users password, no validation beyond that the user exists is 
     * required
     * @param userID
     * @param password The password to be set
     * @return false only if the user doesn't exist
     */
    public boolean setPassword(int userID, String password);
    
    public PollReport getPollReport();
}
